package com.nogroup.springbootproject.service;

import com.nogroup.springbootproject.dto.ClassroomDto;
import com.nogroup.springbootproject.dto.ExamDto;
import com.nogroup.springbootproject.entity.Cclass;
import com.nogroup.springbootproject.entity.Classroom;
import com.nogroup.springbootproject.entity.Exam;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;

/**
 * (Classroom)表服务接口
 *
 * @author makejava
 * @since 2024-04-07 18:45:32
 */
public interface ClassroomService {

    /**
     * 通过ID查询单条数据
     *
     * @param classroomCode 主键
     * @return 实例对象
     */
    Classroom queryById(String classroomCode);

    /**
     * 分页查询
     *
     * @param classroom 筛选条件
     * @param pageRequest      分页对象
     * @return 查询结果
     */
    Page<Classroom> queryByPage(Classroom classroom, PageRequest pageRequest);

    /**
     * 新增数据
     *
     * @param classroom 实例对象
     * @return 实例对象
     */
    Classroom insert(Classroom classroom);

    /**
     * 修改数据
     *
     * @param classroom 实例对象
     * @return 实例对象
     */
    Classroom update(Classroom classroom);

    /**
     * 通过主键删除数据
     *
     * @param classroomCode 主键
     * @return 是否成功
     */
    Classroom deleteById(Classroom classroom);

    List<Classroom> getAllClassrooms();

    List<Classroom> getClassroomsByFuzzySearch(ClassroomDto classroomDto);

    Long countPage(ClassroomDto classroomDto);

}
